package com.developer.platform.application.query.dto;

import com.developer.platform.infrastructure.enums.StatusEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;

/**
 * @author ：qiaoliang
 * @date ：2021-01-07
 */
@ApiModel("日志返回模型")
public class LogDto extends BaseDto{
  @ApiModelProperty(value = "请求参数")
  private String inputParam;
  @ApiModelProperty(value = "返回参数")
  private String outParam;
  @ApiModelProperty(value = "请求方法")
  private String methodName;
  @ApiModelProperty(value = "方法描述")
  private String discription;
  @ApiModelProperty(value = "请求方式")
  private String method;
  @ApiModelProperty(value = "请求Url")
  private String url;
  @ApiModelProperty(value = "功能模块")
  private String businessType;
  @ApiModelProperty(value = "状态")
  private StatusEnum status;
  @ApiModelProperty(value = "异常内容")
  private String errorContent;
  @ApiModelProperty(value = "开始时间")
  private Date startTime;
  @ApiModelProperty(value = "结束时间")
  private Date endTime;
  @ApiModelProperty(value = "耗时")
  private Long consumingTime;

  public String getInputParam() {
    return inputParam;
  }

  public void setInputParam(String inputParam) {
    this.inputParam = inputParam;
  }

  public String getOutParam() {
    return outParam;
  }

  public void setOutParam(String outParam) {
    this.outParam = outParam;
  }

  public String getMethodName() {
    return methodName;
  }

  public void setMethodName(String methodName) {
    this.methodName = methodName;
  }

  public String getDiscription() {
    return discription;
  }

  public void setDiscription(String discription) {
    this.discription = discription;
  }

  public String getMethod() {
    return method;
  }

  public void setMethod(String method) {
    this.method = method;
  }

  public String getUrl() {
    return url;
  }

  public void setUrl(String url) {
    this.url = url;
  }

  public String getBusinessType() {
    return businessType;
  }

  public void setBusinessType(String businessType) {
    this.businessType = businessType;
  }

  public StatusEnum getStatus() {
    return status;
  }

  public void setStatus(StatusEnum status) {
    this.status = status;
  }

  public String getErrorContent() {
    return errorContent;
  }

  public void setErrorContent(String errorContent) {
    this.errorContent = errorContent;
  }

  public Date getStartTime() {
    return startTime;
  }

  public void setStartTime(Date startTime) {
    this.startTime = startTime;
  }

  public Date getEndTime() {
    return endTime;
  }

  public void setEndTime(Date endTime) {
    this.endTime = endTime;
  }

  public Long getConsumingTime() {
    return startTime.getTime() - endTime.getTime();
  }

  public void setConsumingTime(Long consumingTime) {
    this.consumingTime = consumingTime;
  }
}
